package cn.zorbus.oss.impl;

import cn.zorbus.oss.IOssTemplate;
import cn.zorbus.oss.OssFileInfo;
import com.qiniu.util.Auth;
import lombok.RequiredArgsConstructor;
import org.jetbrains.annotations.NotNull;

/**
 * create in 2024/11/7 23:44
 *
 * @author shishaodong
 * @version 0.0.1
 */
@RequiredArgsConstructor
public class OssTemplateQiNiuImpl implements IOssTemplate {

    private final Auth auth;

    @Override
    public String getUploadUrl(@NotNull OssFileInfo ossFileInfo) {
        return auth.uploadToken(ossFileInfo.getBucket(), ossFileInfo.getKey());
    }

}
